#include"LinkNode.h"

void test1()
{
	SListNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPrint(plist);

	
	SListPopBack(&plist);
	SListPopBack(&plist);
	SListPopBack(&plist);
	
	SListPrint(plist);

	SListPushFront(&plist, 1);
	SListPushFront(&plist, 2);
	SListPushFront(&plist, 3);
	SListPrint(plist);

	SListPopFront(&plist);
	SListPopFront(&plist);
	SListPrint(plist);
}

void test2()
{
	SListNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPrint(plist);

	SListNode* pos = SListFind(plist, 2);
	SListInsertAfter(pos, 5);
	SListPrint(plist);
	SListEraseAfter(pos);
	SListPrint(plist);

	SLTInsert(&plist, pos, 10);
	SListPrint(plist);

	SLTErase(&plist, pos);
	SListPrint(plist);
	SLTDestroy(&plist);
}

int main()
{
	/*test1();*/
	/*test2();*/
	return 0;
}